import java.util.Scanner;
public class Take2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s=in.nextLine();
        int x=s.lastIndexOf(" ");
        System.out.println(s.substring(x).length());
    }
}
